namespace Cos.Core.NHibernate.Mapping
{
    #region Usings

    using FluentNHibernate.Mapping;

    #endregion

    public class DATABASECHANGELOGMap : ClassMap<DATABASECHANGELOGDataModel>
    {
        #region Constructors and Destructors

        public DATABASECHANGELOGMap()
        {
            this.Table("DATABASECHANGELOG");
            this.LazyLoad();
            this.CompositeId()
                .KeyProperty(x => x.ID)
                .KeyProperty(x => x.AUTHOR)
                .KeyProperty(x => x.FILENAME);

            this.Map(x => x.DATEEXECUTED).Not.Nullable().Column("DATEEXECUTED");
            this.Map(x => x.MD5SUM).Column("MD5SUM");
            this.Map(x => x.DESCRIPTION).Column("DESCRIPTION");
            this.Map(x => x.COMMENTS).Column("COMMENTS");
            this.Map(x => x.TAG).Column("TAG");
            this.Map(x => x.LIQUIBASE).Column("LIQUIBASE");
        }

        #endregion
    }
}